<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .color{
            color:blue
        }
    </style>
</head>
<div>
    <div id="mydiv1">
        AAA建材批发
    </div>
    <h1>
        AAA建材批发
    </h1>
    <div id="mydiv2" class="color">
        AAA建材批发
    </div>
</div>
<body>
    <script>
    let mydiv =document.getElementById("mydiv1")
<<<<<<< HEAD
     console.log("mydiv1")
    let mydiv2=document.getElementsByTagName("div")
    console.log("mydiv2")
    let mydiv3=document.getElementsByClassName("color")
    console.log(mydiv3)
=======
     
    let mydiv2=document.getElementsByTagName("div")
    
    let mydiv3=document.getElementsByClassName("color")
    console.log(mydiv2)
>>>>>>> 19f1947581ea49b3afc6dc1e670e060ad9ba58c1
    mydiv.innerText="<h1>标题<h1>"
    </script>
</body>
</html>